<script language="javascript" type="text/javascript">
function show_advertise()
{
  var ntop = (( $(window).height() - $('#show_ad').height()) / 2+$(window).scrollTop()) - 100;
  var nleft = ( $(window).width() - $('#show_ad').width()) / 2+$(window).scrollLeft();
  $('#show_ad').css({'left': '', 'top':ntop});
  $('#show_ad').fadeIn('slow');
}
</script>

<script language="javascript" type="text/javascript">
function click_for_sale()
{
  document.getElementById('div_for_sale_left').style.display='';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='none';
}
function mouseover_for_sale()
{
  document.getElementById('div_for_sale_left').style.display='';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='none';
}
function click_dream_job()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='none';
}
function mouseover_dream_job()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='none';
}
function click_dream_home()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='none';
}
function mouseover_dream_home()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='none';
}
function click_rent()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='';
  document.getElementById('div_need_left').style.display='none';
}
function mouseover_rent()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='';
  document.getElementById('div_need_left').style.display='none';
}
function click_need()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='';
}
function mouseover_need()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='';
}
function leftmenu_close()
{
  document.getElementById('div_for_sale_left').style.display='none';
  document.getElementById('div_dream_job_left').style.display='none';
  document.getElementById('div_dream_home_left').style.display='none';
  document.getElementById('div_rent_left').style.display='none';
  document.getElementById('div_need_left').style.display='none';
}
</script>

<div class="column1">
	<a href="javascript:void(0);" onclick="click_for_sale();" onmouseover="mouseover_for_sale();" class="high1">Find products online<br />and locally</a>
	<a href="javascript:void(0);" onclick="click_dream_job();" onmouseover="mouseover_dream_job();" class="high2">Find your dream job</a>
	<a href="javascript:void(0);" onclick="click_dream_home();" onmouseover="mouseover_dream_home();" class="high3">Find your dream home</a>
	<a href="javascript:void(0);" onclick="click_rent();" onmouseover="mouseover_rent();" class="high4">Find a new place</a>
	<a href="javascript:void(0);" onclick="click_need();" onmouseover="mouseover_need();" class="high5">Everything else you may<br />need or want</a>

<div id="div_for_sale_left" style="display:none;background:#FFF url(images/mf-glass.jpg) no-repeat right bottom;position:absolute;z-index:100;top:-10px;border:1px solid #999999;width:450px;left:238px;padding:10px">
<div style="background:url(images/pup-arrow.jpg) no-repeat 0 0;min-height:280px;margin-left:-45px; padding-left:55px;">
<span class="hoverbox">
<div align="right"><a class="close" href="javascript:void(0);" onClick="leftmenu_close();"><strong>X</strong></a></div>
<?php
$sqlCategoryLeft="select * from tbl_category where parent_id='1' order by category_name asc";
$exeCategoryLeft=mysql_query($sqlCategoryLeft) or die(mysql_error());
while($arrCategoryLeft=mysql_fetch_array($exeCategoryLeft)) {
?><a href="index.php?subCat=<?php echo $arrCategoryLeft['category_id']?>"><?php echo stripslashes($arrCategoryLeft['category_name'])?></a><?php } ?>
</span>
</div></div>

<div id="div_dream_job_left" style="display:none;background:#FFF url(images/mf-glass.jpg) no-repeat right bottom;position:absolute;z-index:100;top:56px;border:1px solid #999999;width:450px;left:238px;padding:10px">
<div style="background:url(images/pup-arrow.jpg) no-repeat 0 0;min-height:280px;margin-left:-45px; padding-left:55px;">
<span class="hoverbox">
<div align="right"><a class="close" href="javascript:void(0);" onClick="leftmenu_close();"><strong>X</strong></a></div>
<?php
$sqlCategoryLeft="select * from tbl_category where parent_id='2' order by category_name asc";
$exeCategoryLeft=mysql_query($sqlCategoryLeft) or die(mysql_error());
while($arrCategoryLeft=mysql_fetch_array($exeCategoryLeft)) {
?><a href="index.php?subCat=<?php echo $arrCategoryLeft['category_id']?>"><?php echo stripslashes($arrCategoryLeft['category_name'])?></a><?php } ?>
</span>
</div></div>

<div id="div_dream_home_left" style="display:none;background:#FFF url(images/mf-glass.jpg) no-repeat right bottom;position:absolute;z-index:100;top:118px;border:1px solid #999999;width:450px;left:238px;padding:10px">
<div style="background:url(images/pup-arrow.jpg) no-repeat 0 0;min-height:280px;margin-left:-45px; padding-left:55px;">
<span class="hoverbox2">
<div align="right"><a class="close" href="javascript:void(0);" onClick="leftmenu_close();"><strong>X</strong></a></div>
<?php
$sqlCategoryLeft="select * from tbl_category where parent_id='3' order by category_name asc";
$exeCategoryLeft=mysql_query($sqlCategoryLeft) or die(mysql_error());
while($arrCategoryLeft=mysql_fetch_array($exeCategoryLeft)) {
?><a href="index.php?subCat=<?php echo $arrCategoryLeft['category_id']?>"><?php echo stripslashes($arrCategoryLeft['category_name'])?></a><?php } ?>
</span>
</div></div>

<div id="div_rent_left" style="display:none;background:#FFF url(images/mf-glass.jpg) no-repeat right bottom;position:absolute;z-index:100;top:186px;border:1px solid #999999;width:450px;left:238px;padding:10px">
<div style="background:url(images/pup-arrow.jpg) no-repeat 0 0;height:280px;margin-left:-45px; padding-left:55px;">
<span class="hoverbox2">
<div align="right"><a class="close" href="javascript:void(0);" onClick="leftmenu_close();"><strong>X</strong></a></div>
<?php
$sqlCategoryLeft="select * from tbl_category where parent_id='4' order by category_name asc";
$exeCategoryLeft=mysql_query($sqlCategoryLeft) or die(mysql_error());
while($arrCategoryLeft=mysql_fetch_array($exeCategoryLeft)) {
?><a href="index.php?subCat=<?php echo $arrCategoryLeft['category_id']?>"><?php echo stripslashes($arrCategoryLeft['category_name'])?></a><?php } ?>
</span>
</div></div>

<div id="div_need_left" style="display:none;background:#FFF url(images/mf-glass.jpg) no-repeat right bottom;position:absolute;z-index:100;top:253px;border:1px solid #999999;width:450px;left:238px;padding:10px">
<div style="background:url(images/pup-arrow.jpg) no-repeat 0 0;height:280px;margin-left:-45px; padding-left:55px;">
<span class="hoverbox">
<div align="right"><a class="close" href="javascript:void(0);" onClick="leftmenu_close();"><strong>X</strong></a></div>
<?php
$sqlCategoryLeft="select * from tbl_category where parent_id='5' order by category_name asc";
$exeCategoryLeft=mysql_query($sqlCategoryLeft) or die(mysql_error());
while($arrCategoryLeft=mysql_fetch_array($exeCategoryLeft)) {
?><a href="index.php?subCat=<?php echo $arrCategoryLeft['category_id']?>"><?php echo stripslashes($arrCategoryLeft['category_name'])?></a><?php } ?>
</span>
</div></div>

</div>

<div class="column2">
<link href="css/slideshow.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/slideshow-jquery.js"></script>
<script type="text/javascript" src="js/slideshow.js"></script>
<div id='tmpSlideshow'>
	<div id='tmpSlideshowControls'>
		<div class='tmpSlideshowControl' id='tmpSlideshowControl-1'>sell</div>
		<div class='tmpSlideshowControl' id='tmpSlideshowControl-2'>local</div>
		<div class='tmpSlideshowControl' id='tmpSlideshowControl-3'>search</div>
		<div class='tmpSlideshowControl' id='tmpSlideshowControl-4'>bargain</div>
		<div class='tmpSlideshowControl' id='tmpSlideshowControl-5'>sale</div>
	</div>

	<div id='tmpSlide-1' class='tmpSlide'><img src='images/buy-slide-01.jpg' alt='Slide' /></div>
	<div id='tmpSlide-2' class='tmpSlide'><img src='images/buy-slide-02.jpg' alt='Slide' /></div>
	<div id='tmpSlide-3' class='tmpSlide'><img src='images/buy-slide-03.jpg' alt='Slide' /></div>
	<div id='tmpSlide-4' class='tmpSlide'><img src='images/buy-slide-04.jpg' alt='Slide' /></div>
	<div id='tmpSlide-5' class='tmpSlide'><img src='images/buy-slide-05.jpg' alt='Slide' /></div>
</div>
  
<a href="javascript:void(0);" onclick="show_advertise()"><img src="images/banner-adv.jpg" style="margin-top:10px" alt="" /></a>
</div>

<div class="popup_box" id="show_ad"> 
  <div class="popup_box_in" style="height:180px;">
      <div style="float:left; width:95%; padding:5px;">
	<span style="float:right; cursor:pointer;" onclick="$('#show_ad').hide();"><strong>x</strong></span>
      </div>
      <div style="float: left; margin: 0 30px; padding: 5px; text-align: center; width: 85%;">
<strong>If you are interested in advertising on Swapen, please click on "Advertise with Swapen" and fill out the form. At the moment we are not posting ads due to a large amount of inquires and will be sending out emails when we will start. We will get back to you as soon as possible. We appreciate your business and we hope to have your ad on Swapen.com soon.</strong></div><div style="float:left; width:98%; padding:5px;"><input type="button" id="proceedbtn" value="Advertise with Swapen" class="button" onclick="window.location='advertise.php'"  style="float:none; height:30px; cursor:pointer;" /></div>
  </div>
</div>

<div class="column3">
	<div class="one">Refer someone you know</div>
	<div class="two">They sell or buy on swapen</div>
	<div class="three">They sell or buy on swapen</div>
	<p><img src="images/img-dng.jpg" alt="" align="left" />For as long as both<br />of you are members<br />on Swapen.com</p>
<span class="fl-left">parent pending*</span><a class="lmore blue bold">Learn More</a>
</div>

<div class="clear" style="height:8px; line-height:8px;"></div>

<div class="howitworks">
<!--<div class="buttons"><a href="#" class="sp">Sell products</a><br /><a href="#" class="sfu">Sold for you</a><br /><a href="#" class="vpu">Verified local pick-up</a></div> -->
<img src="images/howitwork-01.jpg" name="Rotating" id="Rotating1">
  
  <script language="JavaScript">
  var ImageArr1 = new Array("images/howitwork-01.jpg","images/howitwork-02.jpg","images/howitwork-03.jpg");
  var ImageHolder1 = document.getElementById('Rotating1');
  
  function RotateImages(whichHolder,Start)
  {
  	var a = eval("ImageArr"+whichHolder);
  	var b = eval("ImageHolder"+whichHolder);
  	if(Start>=a.length)
  		Start=0;
  	b.src = a[Start];
  	window.setTimeout("RotateImages("+whichHolder+","+(Start+1)+")",1500);
  }
  
  RotateImages(1,0);
  RotateImages(2,0);
  RotateImages(3,0);
  
  </script></div>

<div class="shop-safe">
	<a href="#" class="ssafe1">Feel safe with<br />Amazon Checkout</a>
	<a href="#" class="ssafe2">You're protected by<br />Amazon A-to-Z<br />guarantee</a>
	<a href="#" class="ssafe3">Shop with a peace of<br />mind from our verified<br />merchants</a>
	<a href="#" class="ssafe4">Shop locally  with our<br />local verification<br />pick-up</a>
</div>